﻿/// <reference name="MicrosoftAjax.js"/>
/// <reference name="Dimok.Web.UI.JS.JQuery.VSDoc.js" assembly="Dimok.Web.UI"/>
/// <reference name="Dimok.Web.UI.JS.MSAjaxExtentions.js" assembly="Dimok.Web.UI"/>
/// <reference name="Dimok.Web.UI.JS.LSON_Lib.js" assembly="Dimok.Web.UI"/>
Type.registerNamespace("motobankcorp");
motobankcorp.Bridge_Notes = function(element) {
  motobankcorp.Bridge_Notes.initializeBase(this, [element]);
}
motobankcorp.Bridge_Notes.prototype = {
  initialize: function() {
    motobankcorp.Bridge_Notes.callBaseMethod(this, 'initialize');
    this._onLoaded();
  },
  dispose: function() {
    motobankcorp.Bridge_Notes.callBaseMethod(this, 'dispose');
  },
  _onLoaded: function() {
    var pe = this.findPageEventsGlobal();
    if (!pe) return;
    pe.add_loanDeselected(Function.createDelegate(this, function() {
      this.get_RGE().set_filterTemp();
    }));
    pe.add_loanSelected(Function.createDelegate(this, function(sender, eventArgs) {
      var keys = eventArgs.get_keys();
      if (!keys.get_LoanID()) this.get_RGE().set_filterTemp();
      else this.get_RGE().set_filterTemp("LoanID", keys.get_LoanID());
    }));
    pe.add_noteInserted(Function.createDelegate(this, function() { this.get_RGE().rebind(); }));
  }
}
motobankcorp.Bridge_Notes.registerClass('motobankcorp.Bridge_Notes', Dimok.Table);
